package com.niiwoo.civet.trade.service.dubbo.contract;

import com.niiwoo.civet.trade.enums.FadadaContractTemplateEnum;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.niiwoo.civet.trade.dto.request.ProjectContractInfoRequestDTO;
import com.niiwoo.civet.trade.dto.response.contract.ProjectContractResponseDTO;
import com.niiwoo.civet.trade.enums.FadadaContractTemplateEnum.TemplateTypeEnum;
import com.niiwoo.civet.trade.service.contract.ProjectContractDubboService;
import com.niiwoo.civet.trade.service.local.contract.ProjectContractLocalService;

@Service(version = "1.0.0")
public class ProjectContractDubboServiceImpl implements ProjectContractDubboService {

	@Autowired
	private ProjectContractLocalService projectContractLocalService;

	@Override
	public ProjectContractResponseDTO queryProjectContract(String userId, Long projectId, TemplateTypeEnum templateType) {
		return projectContractLocalService.queryProjectContract(userId, projectId, templateType);
	}

	@Override
	public ProjectContractResponseDTO queryProjectContractByProjectIdAndContractType(Long projectId, TemplateTypeEnum templateType) {
		return projectContractLocalService.queryProjectContractByProjectIdAndContractType(projectId,templateType);
	}

	@Override
	public List<ProjectContractResponseDTO> queryProjectContracts(ProjectContractInfoRequestDTO requestDTO) {
		return projectContractLocalService.queryProjectContracts(requestDTO);
	}
}
